<title>State</title>
<h2>State</h2>
<div id="view-content">
    <div class="row-fluid">
        <div class="span4">            
            <div class="well span10">
                <h3>Add New</h3>
                <?= $this->form ?>
            </div>            
        </div>
        <div class="well span6">
            <h3>List</h3>
            <table class="table">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>State Name</th>
                        <th></th>
                    </tr>
                </thead>
                <?php
                $index = 1;
                foreach ($this->allStates as $state) :
                    ?>
                    <tr>
                        <td><?= $index ?></td>
                        <td><?= $state['name'] ?></td>
                        <td><a class="btn btn-small" href="<?= $this->url(array('id' => $state['id']), 'state-update'); ?>"><i class="icon-edit"></i> Edit</a></td>
                    </tr>
                    <?php
                    $index++;
                endforeach;
                ?>
            </table>
        </div>
    </div>
</div>